package com.springcloudalibaba.apiApp.controller;

import com.springcloudalibaba.basefeign.service.user.api.BuyerFeign;
import com.springcloudalibaba.bclass.base.BaseResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @描述：测试
 * @作者：lixing_java@163.com
 * @时间：2021/9/17 14:26
 */
@RestController
@RequestMapping("demo")
public class DemoController {
    @Resource
    private BuyerFeign buyerFeign;

    /**
     * @描述 测试
     * @作者 lixing_java@163.com
     * @日期 2021/9/17 14:29
     * 直接访问：127.0.0.1:8772/apiApp/demo/createOrder
     * 网关访问：127.0.0.1:8763/springCloudGateway/gatewayApp/demo/createOrder
     */
    @GetMapping("createOrder")
    public BaseResult<String> createOrder() {
        BaseResult<String> baseResultForCreateOrder = buyerFeign.createOrder();
        return baseResultForCreateOrder;
    }

}
